//-----------------Sonic CD Snake Bullet Script-------------------//
//------------------Scripted by Twanvanb1-------------------//
// Yeah...

// Aliases
#alias Object.Value0	:	Object.Timer
// Object.Value1 - 3 aren't used
#alias Object.Value4	:	Object.XVelocity

// Collision Sides
#alias 1	:	CSIDE_LWALL
#alias 2	:	CSIDE_RWALL

// States
#alias 0	:	BULLET_FLY
#alias 1	:	BULLET_FALLEN

sub ObjectMain
	Object.XPos += Object.XVelocity

	// Reset object when out of bounds
	if Object.OutOfBounds == true
		Object.Type = 0
	end if
end sub

sub ObjectPlayerInteraction
	PlayerObjectCollision(C_TOUCH, -2, -2, 2, 2)
	if CheckResult == true
		CallFunction(Player_Hit)
	end if
end sub

sub ObjectDraw
	DrawSprite(0)
end sub

sub ObjectStartup
	LoadSpriteSheet("R2/Objects.gif")

	SpriteFrame(-3, -3, 6, 6, 67, 130)
end sub